/*
 * @Author: your name
 * @Date: 2021-11-04 17:45:33
 * @LastEditTime: 2022-01-15 11:07:03
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \star-cat-h5\src\vuex\modules\artist\index.js
 */

const state = {
    data: {
        artist_id:"",
        name: "", //姓名
        card_num: "", //身份证号
        card_url: "", //身份证url地址
        anchor: [{
            id: "", //主键
            unique_id: "", //主播id
            platforms_id: "", //平台id
            platforms_name: "", //平台name
            is_main: true //是否是主键1是 2否
        }],
        wechat: "", //微信号
        mobile: "", //手机号
        star_scout: "", //星探
        star_scout_name: "",
        agent: "", //经纪人
        agent_name: "",
        remarks: "", //艺人备注 不超过300位
        commercial_label:"",
        content_label:""
    },

    current: 0 //当前步骤
    // uid: "", //
}

const mutations = {
    SET_CURRENT: (state, current) => {
        state.current = current
    },
    SET_VAL: (state, data) => {
        state[key] = val;
    },
    SET_DATA: (state, data) => {
        state.data = data;
    }
}

const actions = {
    setCurrent({
        commit
    }, current) {
        commit('SET_CURRENT', current)
    },
    setArtist({
        commit
    }, artist) {
        commit('SET_ARTIST', artist)
    },
    setAnchor({
        commit
    }, anchor) {
        commit('SET_ANCHOR', anchor)
    },
    setVal({
        commit
    }, data) {
        commit('SET_VAL', data)
    },
    setData({
        commit
    }, data) {
        console.log(data)
        commit('SET_DATA', data)
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}